package org.dromara.comm.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.dromara.system.domain.SysUser;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 发闲置类
 *
 * @author: 郭伟明
 * @date: 2024-08-05 09:13
 **/
@Data
@TableName("as_leave_idle")
public class AsLeaveIdle {

    @TableId
    private Integer id;

    private String description;

    private String thumbnail;

    private BigDecimal sellingPrice;

    private BigDecimal costPrice;

    private String address;

    private String categoryId;

    private Integer userId;

    private String category;

    private Integer state;

    private Integer status;

    private String productName;

    @TableField(exist = false)
    private List<AsLeaveIdle> children; // 添加子节点列表

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private String createBy;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private String updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @TableLogic
    private Long isDelete;          // 逻辑删除

    @TableField(exist = false)
    private List<SysUser> sysUsers; // Add getter and setter for SysUsers

    @TableField(exist = false)
    private List<AsLabel> asLabels; // Add getter and setter for AsLabels

    @TableField(exist = false)
    private List<AsLeaveIdleImage> asLeaveIdleImages; // Add getter and setter for AsLeaveIdleImages
}
